//
//  UIButton+Jakie.m
//  Longer3D
//
//  Created by 王大江 on 15/12/28.
//  Copyright © 2015年 longer3d. All rights reserved.
//

#import "UIButton+Jakie.h"

@implementation UIButton (Jakie)

- (void)setTitleNormal:(NSString *)normalText TitleColor:(UIColor *)titleColor Font:(UIFont *)font{
    [self setTitle:normalText forState:UIControlStateNormal];
    [self setTitleColor:titleColor forState:UIControlStateNormal];
    self.titleLabel.font = font;
}


- (void)setTitleNormal:(NSString *)normalText Disabled:(NSString *)disableText TitleColor:(UIColor *)titleColor Font:(UIFont *)font{
    
    [self setTitle:disableText forState:UIControlStateDisabled];
    [self setTitleNormal:normalText TitleColor:titleColor Font:font];
}


- (void)setTitleNormal:(NSString *)normalText Selected:(NSString *)selectedText TitleColor:(UIColor *)titleColor Font:(UIFont *)font{
    
    [self setTitle:selectedText forState:UIControlStateSelected];
    [self setTitleNormal:normalText TitleColor:titleColor Font:font];
}

- (void)setTitleNormal:(NSString *)normalText Selected:(NSString *)selectedText TitleColor:(UIColor *)titleColor SelectedTitleColor:(UIColor *)selectedColor Font:(UIFont *)font{

    [self setTitleNormal:normalText Selected:selectedText TitleColor:titleColor Font:font];
    [self setTitleColor:selectedColor forState:UIControlStateSelected];
}



- (void)setImageNormal:(UIImage *)normalImage ImageDisable:(UIImage *)disabledImage{

    [self setImage:normalImage forState:UIControlStateNormal];
    [self setImage:disabledImage forState:UIControlStateDisabled];
}


- (void)setImageNormal:(UIImage *)normalImage ImageHighlight:(UIImage *)highlightImage{
    
    [self setImage:normalImage forState:UIControlStateNormal];
    [self setImage:highlightImage forState:UIControlStateHighlighted];
}


- (void)setImageNormal:(UIImage *)normalImage ImageSelected:(UIImage *)selectedImage{
    
    [self setImage:normalImage forState:UIControlStateNormal];
    [self setImage:selectedImage forState:UIControlStateSelected];
}





- (void)setBackgroundImage:(UIImage *)normalImage ImageDisable:(UIImage *)disableImage{

    [self setBackgroundImage:normalImage forState:UIControlStateNormal];
    [self setBackgroundImage:disableImage forState:UIControlStateDisabled];
}

- (void)setBackgroundImage:(UIImage *)normalImage ImageHighlight:(UIImage *)highlightImage{
    
    [self setBackgroundImage:normalImage forState:UIControlStateNormal];
    [self setBackgroundImage:highlightImage forState:UIControlStateHighlighted];
}

- (void)setBackgroundImage:(UIImage *)normalImage ImageSelected:(UIImage *)selectedImage{
    
    [self setBackgroundImage:normalImage forState:UIControlStateNormal];
    [self setBackgroundImage:selectedImage forState:UIControlStateSelected];
}



@end
